package com.demo.base;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.*;
import io.swagger.annotations.*;
import lombok.*;
import lombok.experimental.*;
import org.hibernate.annotations.*;
import org.springframework.data.annotation.*;
import org.springframework.data.jpa.domain.support.*;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.*;
import java.io.*;
import java.time.*;
import java.util.*;

@Data
@Accessors(chain = true)
@EntityListeners(AuditingEntityListener.class)
@MappedSuperclass
public class BaseModel implements Serializable {

    public static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @TableId(type = IdType.AUTO)
    private Integer id;


    @TableField(fill = FieldFill.INSERT)
    @CreatedDate
    @Column(updatable = false)
    private LocalDateTime createTime;

    @ApiModelProperty("共用外键")
    private Integer link;
}
